package util;

import java.util.Arrays;

/**
 * Helper Class containing statistic data
 * 
 * @author MK
 * 
 */
public class Statistic {

	private String[] xValues;
	private double[] yValues;

	public Statistic(String[] xValues, double[] yValues) {
		super();
		this.xValues = xValues;
		this.yValues = yValues;
	}

	public String[] getxValues() {
		return xValues;
	}

	public void setxValues(String[] xValues) {
		this.xValues = xValues;
	}

	public double[] getyValues() {
		return yValues;
	}

	public void setyValues(double[] yValues) {
		this.yValues = yValues;
	}

	public double getHighestYValue() {

		double max = 0;

		for (double value : yValues) {
			if (value > max) {
				max = value;
			}
		}
		return max;
	}

	public String toString() {
		return "[Statistic: " + Arrays.toString(xValues) + " "
				+ Arrays.toString(yValues) + "]";
	}
}